From f2374b510e4a782a94d1ea080647aa8f450d81b1 Mon Sep 17 00:00:00 2001 From: "ach61@labyrinth.cl.cam.ac.uk" Date: Wed, 15 Oct 2003 14:59:07 +0000 Subject: [PATCH] bitkeeper revision 1.524 (3f8d60bbWQ4zSOsE99hsVgC8-htjLw) add hook for pervasive debugging --- xen/common/dom0_ops.c | 9 +++++++++ xen/include/hypervisor-ifs/dom0_ops.h | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/xen/common/dom0_ops.c b/xen/common/dom0_ops.c index c3e098dd3c..408f1a763d 100644 --- a/xen/common/dom0_ops.c +++ b/xen/common/dom0_ops.c @@ -308,6 +308,15 @@ long do_dom0_op(dom0_op_t *u_dom0_op) } break; + case DOM0_DEBUG: + { + op.u.debug.out1 = op.u.debug.in2 + 1; + op.u.debug.out2 = op.u.debug.in1 + 1; + copy_to_user(u_dom0_op, &op, sizeof(op)); + ret = 0; + } + break; + default: ret = -ENOSYS; diff --git a/xen/include/hypervisor-ifs/dom0_ops.h b/xen/include/hypervisor-ifs/dom0_ops.h index a68db6ce95..4aa0810f44 100644 --- a/xen/include/hypervisor-ifs/dom0_ops.h +++ b/xen/include/hypervisor-ifs/dom0_ops.h @@ -21,6 +21,7 @@ #define DOM0_BUILDDOMAIN 13 #define DOM0_IOPL 14 #define DOM0_MSR 15 +#define DOM0_DEBUG 16 /* pervasive debugger */ #define MAX_CMD_LEN 256 #define MAX_DOMAIN_NAME 16 @@ -108,6 +109,15 @@ typedef struct dom0_msr_st } dom0_msr_t; +typedef struct dom0_debug_st +{ + /* IN variables. */ + int in1, in2; + /* OUT variables. */ + int out1, out2; + +} dom0_debug_t; + typedef struct dom0_op_st { unsigned long cmd; @@ -122,6 +132,7 @@ typedef struct dom0_op_st dom0_getdominfo_t getdominfo; dom0_iopl_t iopl; dom0_msr_t msr; + dom0_debug_t debug; } u; } dom0_op_t; -- 2.30.2